class AddForeignKeysToAll < ActiveRecord::Migration
  def self.up
    add_foreign_key :activities, :projects, :dependent => :delete
    add_foreign_key :activities, :milestones, :dependent => :delete
    add_foreign_key :designations, :projects, :dependent => :delete
    add_foreign_key :designations, :users, :dependent => :delete
    add_foreign_key :logs, :projects, :dependent => :delete
    add_foreign_key :milestones, :projects, :dependent => :delete
  end

  def self.down
    remove_foreign_key :activities, :projects, :dependent => :delete
    remove_foreign_key :activities, :milestones, :dependent => :delete
    remove_foreign_key :designations, :projects, :dependent => :delete
    remove_foreign_key :designations, :users, :dependent => :delete
    remove_foreign_key :logs, :projects, :dependent => :delete
    remove_foreign_key :milestones, :projects, :dependent => :delete
  end
end